<script>
    BaseLookUp.init({
        navTabId:"${navTabId!''}",
        checkedName : "serviceId",
        url : "/service/grantServicesToProcess"
    })
    
</script>

<#include "/common/pagerForm.html">
<form rel="pagerForm" method="post" action="${rc.getContextPath()}/manage/service/servicesLookup" onsubmit="return dialogSearch(this)">
    <input type="hidden" name="modelId" value="${modelId!''}" />
    <input type="hidden" name="navTabId=" value="${navTabId!''}" />
<div class="pageHeader">
    <div class="searchBar">
        <ul class="searchContent">
            <li>
                <label><@label key='service_name.C,colon'>服务名称：</@label></label>
                <input type="text" name="serviceName" value="${condition.serviceName!''}"/>
            </li>
            <li>
                <label><@label key='service_code.C,colon'>服务标识：</@label></label>
                <input type="text" name="serviceCode" value="${condition.serviceCode!''}"/>
            </li>
        </ul>
        <ul class="searchContent">
            <li>
                <label><@label key='serviceType.C,colon'>服务类型：</@label></label>
                <select name="type">   
                    <option value="" ><@label key='all.C'>所有</@label></option>             
                    <#if ecodes??> 
                       <#list ecodes as ecode>
                         <option value="${ecode.eCode!''}" <#if condition.type ==ecode.eCode> selected</#if>>${ecode.eCodeText!''}</option> 
                       </#list> 
                   </#if>
                </select>
            </li>
            <li></li>
            <li style="width:80px;"><div class="buttonActive"><div class="buttonContent"><button type="submit"><@label key='query.B'>查询</@label></button></div></div></li>
        </ul>
    </div>
</div>
</form>

<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li><a class="edit" onclick="grantServicesDone(${modelId!''});"><span><@label key='ok.B'>确定</@label></span></a></li>
        </ul>
    </div>
    <table class="table border" width="100%" layoutH="160">
        <thead>
            <tr>
                <th width="22"><input type="checkbox" group="serviceId" class="checkboxCtrl"></th>
                <th width="100" orderField="serviceName" ><@label key='service_name.C'>服务名称</@label></th>
                <th width="100" orderField="serviceCode"><@label key='service_code.C'>服务标识</@label></th>
                 <th width="100" orderField="type"><@label key='serviceType.C'>服务类型</@label></th>
                <th width="100" orderField="createUser"><@label key='createUser.C'>创建人</@label></th>
                <th width="50" orderField="createDate"><@label key='createDateTime.C'>创建时间</@label></th>
            </tr>
        </thead>
        <tbody>
        <#if page??><#if (page.data?size>0)> <#list page.data as service>
            <tr>
                <td><input type="checkbox" name="serviceId" onclick="BaseLookUp.grantSourceToGoal(this)" value="{serviceId:${service.id!''}, modelId:${modelId!''}}"/></td>
                <td>${service.serviceName!''}</td>
                <td>${service.serviceCode!''}</td>
                <td>
                    <#if ecodes??>
                        <#list ecodes as ecode>
                            <#if service.type == ecode.eCode>${ecode.eCodeText!''}<#break></#if>
                        </#list>
                    </#if>
                </td>
                <td>${service.createUser!''}</td>
                <td>${service.createDateTime?string("YYYY-MM-dd")}</td>
            </tr>
        </#list>
        <#else>
        <tr>
                <td colspan="5" class="noData">======<@label key='noListData.C'>列表无数据</@label>=====</font></td>
        </tr>
        </#if>
        <#else>
        <tr>
                <td colspan="5" class="noData">======<@label key='noListData.C'>列表无数据</@label>=====</font></td>
        </tr>
        </#if>
        </tbody>
    </table>
        <#include "/common/dialogPanelBar.html">
</div>